package com.woniuxy.demo.epai.controller;


import com.woniuxy.demo.epai.common.Result;
import com.woniuxy.demo.epai.dao.ClassifyMapper;
import com.woniuxy.demo.epai.model.Classify;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author epai
 * @since 2021-04-12
 */
@RestController
@RequestMapping("/epai/classify")
@Slf4j
public class ClassifyController {
    @Autowired
    private ClassifyMapper mapper;

    @GetMapping("/findClassityid")
    public Result findIdByTypeName(String typeName){
        log.info("进入方法参数为,{}",typeName);
        Classify classify = mapper.findIdByTypeName(typeName);
        return Result.success(classify.getId());
    }


}

